package com.googlecode.imanager.client.form;

import com.googlecode.imanager.client.Container;
import com.googlecode.imanager.client.bridge.form.IListBox;
import com.googlecode.imanager.client.util.SelectionMode;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class ListBox<T> extends InputList<T> implements IListBox<T> {

    private static final long serialVersionUID = 1L;

    // TODO dar suporte à exibição de checkbox ou radio button nos items

    public ListBox() {
        this(80, 100);
    }
    
    public ListBox(Container parent) {
        this();
        setParent(parent);
    }
    
    protected ListBox(int width, int height) {
        super(width, height);
    }
    
    @Override
    public SelectionMode getSelectionMode() {
        // TODO dar suporte à seleção múltipla
        return SelectionMode.NONE;
    }

    @Override
    public ListBox<T> clone() {
        return (ListBox<T>) super.clone();
    }

    @Override
    @SuppressWarnings("unchecked")
    protected IListBox<T> getBridge() {
        return (IListBox) lookupBridge();
    }
    
}
